
package com.joysuch.wwyt.core.bean;

import java.util.ArrayList;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import lombok.Data;

//下拉列表通用格式bean
@Data
@JsonInclude(value = Include.NON_NULL)
public class SimpleSelectListRecursiveBean {

    private Long value;
    private String label;

    private List<SimpleSelectListRecursiveBean> children;

    public void addChild(SimpleSelectListRecursiveBean bean) {
        if (children == null) {
            children = new ArrayList<SimpleSelectListRecursiveBean>();
        }
        children.add(bean);
    }

}
